package day5;

import java.io.File;

/**
 * @author oldliu
 * @since 1.0
 */
public class FileTest {
    public static void main(String[] args) {
        //   /
        File f=new File("D:\\Documents\\桌面\\新建文件夹");
        System.out.println(f.length()+"字节");
        System.out.println(f.getParent()+":上级");
        System.out.println(f.getName());

        System.out.println("修改时间："+f.lastModified());
        System.out.println("是目录？"+f.isDirectory());
        System.out.println("是文件？"+f.isFile());
        System.out.println("存在？"+f.exists());
        System.out.println("能读？"+f.canRead());
        System.out.println("能写？"+f.canWrite());
        System.out.println("能执行？"+f.canExecute());
    }
}
